<%@ page import="dao.IAdminDao" %>
<%@ page import="dao.IBoardDao" %>
<%@ page import="Impl.BoardDaoImpl" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/4/2
  Time: 19:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    String name= request.getParameter("add");
    IBoardDao ibd=new BoardDaoImpl();
           int b= ibd.addBoard(name);
           if (b>0){
               out.print("<script>alter('添加成功')</script>");
               request.getRequestDispatcher("add_zhut.jsp").forward(request,response);
           }else {
               out.print("<script>alter('添加失败');</script>");
               response.sendRedirect("add_zhut.jsp");
           }

%>

</body>
</html>
